/*-
 * Copyright (c) 2009-2010 David Forsythe.
 * See LICENSE file for license details.
 */

#ifndef __LIBPKG_INTERNAL_H__
#define __LIBPKG_INTERNAL_H__

typedef enum {
        OPEN,
        CLOSED
} status_t;

#include "exec_internal.h"
#include "pkg_internal.h"
#include "database_internal.h"
#include "repository_internal.h"

/* #include "repository_internal.h" */

#include "util.h"

#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

/* Print a message and crash the client.  Abort so we can trace. */
#define PKG_CLIENT_CRASH(fn, m) \
warnx("libpkg: %s: %s\n\n Reported from: %s (%s[%d])", fn, m, __func__, \
        __FILE__, __LINE__); \
abort()

#define PKG_CLIENT_WARNING(m) \
warnx("libpkg: %s (%s[%d]): %s", __func__, __FILE__, __LINE__, m)

#endif
